package com.zgjkhis.modules.system.service;

import com.zgjkhis.common.service.BaseService;
import com.zgjkhis.domain.PageResult;
import com.zgjkhis.modules.system.domain.DrugWareHousing;
import com.zgjkhis.modules.system.domain.vo.DrugWareHousingVo;
import com.zgjkhis.modules.system.service.dto.DrugQueryCriteria;
import com.zgjkhis.modules.system.service.dto.DrugWareHousingQueryCriteria;
import org.springframework.data.domain.Pageable;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.text.ParseException;

/**
 * @Author yzq
 * @Description 药品入库
 * @Date 2021/6/23 9:45
 * @Param
 * @return
 **/
public interface DrugWareHousingService extends BaseService<DrugWareHousing>{


    /**
     * @Author yzq
     * @Description 新增入库
     * @Date 2021/6/28 10:33
     * @Param [drugWareHousing]
     * @return boolean
     **/
    boolean createDrugWareHousing(DrugWareHousingVo drugWareHousing);

    /**
     * @Author yzq
     * @Description 分页查询入库信息
     * @Date 2021/6/28 14:51
     * @Param [criteria, pageable]
     * @return java.lang.Object
     **/
    PageResult<DrugWareHousing> findAllByPageable(DrugWareHousingQueryCriteria criteria, Pageable pageable);

    /**
     * @Author yzq
     * @Description 导出入库信息
     * @Date 2021/6/28 14:51
     * @Param [criteria, pageable]
     * @return java.lang.Object
     **/
    void findAllByPageableForOut(DrugWareHousingQueryCriteria criteria, HttpServletResponse response) throws IOException;

    /**
     * @Author yzq
     * @Description 导出入库信息
     * @Date 2021/6/28 14:51
     * @Param [criteria, pageable]
     * @return java.lang.Object
     **/
    void outTemplate(DrugQueryCriteria criteria, HttpServletResponse response) throws IOException;

    void inTemplate(MultipartFile file, Integer status,Integer wareHousingType,Long supplierId,String supplierName,Integer drugType) throws IOException, ParseException;

    /**
     * 更改支付状态
     * @param id
     * @param payStatus
     */
    void updatePayStatus(Long id, int payStatus);


    void outWareHousing(String id, HttpServletResponse response) throws IOException;

    void outDetail(DrugWareHousingQueryCriteria criteria, HttpServletResponse response) throws IOException;
}
